<?php echo $this->Session->flash(); ?>
<table border="1" width="100%">
    <thead>
        <tr>
            <th><h1>REQUISITOS PROYECTO </h1></th>
</tr>
</thead>
<tbody>

</tbody>
</table>

<table id="tabla" class="tabla"  >
    <thead>
        <tr>
            <th>ID </th>
            <th>TEXTO</th>
            <th>Estado</th>
            <th colspan="3">Opciones</th>
        </tr>
    <tbody>
        <?php foreach ($requisitos as $rec): ?>
            <?
            $re = "Sin Registro";
            foreach ($rec['Rating'] as $cal) {

                switch ($cal['calificacion']) {
                    case 0:
                        $re = "Sin Registro";
                        break;
                    case 1:
                        $re = "Cumple";
                        break;
                    case 2:
                        $re = "No Cumple";
                        break;
                    case 3:
                        $re = "Subsanable";
                        break;

                    default:
                        $re = "Sin Registro";
                        break;
                }
            }
            ?>
            <tr>
                <td><?php echo $rec['ProyectRequirement']['id'] ?></td>
                <td><?php echo $rec['Requirement']['texto'] ?></td>
                <td><?php echo $re ?></td>
                <td><?php echo $ajax->link("Ver concepto", array('controller' => 'Ratings', "action" => "index", $rec['ProyectRequirement']['id']), array('update' => 'content', 'complete' => 'cargar()')) ?></td>
                <td></td>
                <td></td>

            </tr>
        <?php endforeach; ?>
    </tbody>
</table>


<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
